//格式化时间
function formatTime(time) {

	var Sys = {};
	var ua = navigator.userAgent.toLowerCase();
	if (window.ActiveXObject)
		Sys.ie = ua.match(/msie ([\d.]+)/)[1];
	else if (document.getBoxObjectFor)
		Sys.firefox = ua.match(/firefox\/([\d.]+)/)[1];
	else if (window.MessageEvent && !document.getBoxObjectFor)
		Sys.chrome = ua.match(/chrome\/([\d.]+)/)[1];
	else if (window.opera)
		Sys.opera = ua.match(/opera.([\d.]+)/)[1];
	else if (window.openDatabase)
		Sys.safari = ua.match(/version\/([\d.]+)/)[1];

	//将timestamp转换格式
	var date = time;
	var year = 0;
	if (Sys.ie) {
		year = date.getYear(); //得到年份
	} else if (Sys.firefox || Sys.chrome) {
		year = date.getYear() + 1900; //得到年份
	}

	//alert(year);
	var month = date.getMonth() + 1; //得到月份
	var day = date.getDate(); //得到日期
	var hours = date.getHours(); //得到小时
	var minutes = date.getMinutes(); //得到分钟
	var seconds = date.getSeconds(); //得到秒钟

	/*
	if (month < 10) {
		month = '0' + month;
	}
	if (day < 10) {
		day = '0' + day;
	}
	if (hours < 10) {
		hours = '0' + hours;
	}
	if (minutes < 10) {
		minutes = '0' + minutes;
	}
	if (seconds < 10) {
		seconds = '0' + seconds;
	}
	 */
	var publishTime = year + '/' + month + '/' + day + '/ ' + hours + ':'
	+ minutes + ':' + seconds; //拼凑时间

	return publishTime;
}